<?php include THEMES_PATH . 'public/before_body2.phtml';?>
<link href="/statics/front/css/center.css" rel="stylesheet">
<style>
.login-reg > .pull-left, .login-reg > .pull-right {width:50%;}
.login-reg input[type=text], .login-reg input[type=password] {max-width:300px;margin-bottom:1em;}
.login-reg p.error {margin-top:-1em;margin-bottom:.5em;text-align:left;}
.login-reg .btn {max-width:150px;}
@media screen and (max-width: 320px) {
.login-reg > .pull-left, .login-reg > .pull-right {float:none;width:100%;text-align:left;}
}
</style>
</head>
<body>
<?php include THEMES_PATH . 'public/header2.phtml';?>
<div class="main-width clearfix login-reg" style="padding-bottom:5%;">
  <strong class="title align-left"><?php echo L('changepasswd');?></strong>
  <div class="pull-left">
    <form id="edit-psd-form" name="loginForm" method="post" action="<?php echo $submit_url;?>" autocomplete="off">
      <input type="text" name="email" id="email" value="<?php echo $email;?>" placeholder="<?php echo L('login_name');?>" disabled />
      <input type="password" name="password" id="password" placeholder="<?php echo L('newpassword');?>" />
      <input type="password" name="confirm_password" id="confirm_password" placeholder="<?php echo L('doublenpw');?>" />
      <input type="submit" name="dosubmit" value="<?php echo L('submit');?>" class="btn btn-primary" />
    </form>
  </div>
  <div class="pull-right">
    <p><?php echo L('register_user');?> <a href="<?php echo url('user/register');?>"><?php echo L('register');?></a></p>
  </div>
</div>
<?php include THEMES_PATH.'public/footer2.phtml';?>
<script>
$(function() {
  $('#edit-psd-form').validate({
    errorElement: 'p',
    rules: {
      password: {
        required: true,
        minlength: 6
      },
      confirm_password: {
        required: true,
        minlength: 6,
        equalTo: '#password'
      }
    },
    messages: {
      password: {
        required: "<?php echo L('input_login_passwd') ?>",
        minlength: $.format("<?php echo L('_THE_PASSWORD_SHOULD_BE_BETWEEN_6_20_');?>")
      },
      confirm_password: {
        required: "<?php echo L('input_login_pw2');?>",
        minlength: $.format("<?php echo L('_THE_PASSWORD_SHOULD_BE_BETWEEN_6_20_');?>"),
        equalTo: "<?php echo L('password_not_match');?>"
      }
    }
  });
});
</script>

<?php include THEMES_PATH.'public/after_body.phtml';?>